import React from 'react'
import { Helmet } from "react-helmet";
import Header from "@shared/header";
import { RightOutline } from "antd-mobile-icons";
import Password from "./widgets/password";
import Message from "@pages/login/widgets/message";
import useToggle from "@hooks/useToggle";
import styles from "@styles/login.module.scss";
export default function Login() {
    // 用于控制短信登录组件和密码登录组件的切换
    const [mobileLogin, setMobileLogin] = useToggle(false);
  return (
    <>
      <Helmet>
        <title>优医问诊-登录</title>
      </Helmet>
      <Header link={"注册"} />
      <div className={styles.page}>
        <div className={styles.title}>
          <h3>{mobileLogin ? "短信登录" : "密码登录"}</h3>
          <span onClick={setMobileLogin}>
            {mobileLogin ? "密码登录" : "短信登录"} <RightOutline />
          </span>
        </div>
        {mobileLogin ? <Message /> : <Password />}
        <div className={styles.forget}>
          <a href="#">忘记密码?</a>
        </div>
        <div className={styles.third}>
          <div className={styles.headline}>
            <span>第三方登录</span>
          </div>
          <div className={styles.methods}>
            <img src={require("@icons/login/qq.svg").default} alt="QQ登录" />
          </div>
        </div>
      </div>
    </>
  )
}


// import React from 'react'
// import { Helmet } from "react-helmet";
// export default function Home() {
//   return (
//   <>
//     <Helmet>
//       <title>优医问诊-首页</title>
//     </Helmet>
//     <div>22222</div>
//   </>  
//   )
// }